package com.yitong.equipment.database.entity

import androidx.room.ColumnInfo
import androidx.room.Entity
import androidx.room.Ignore
import androidx.room.PrimaryKey
import kotlinx.android.parcel.Parcelize

@Parcelize
@Entity(tableName = "User")
data class User(
    @PrimaryKey(autoGenerate = true)
    var _id: Long = 0,
    @ColumnInfo(name = "id")
    var id: String? = "",
    @ColumnInfo(name = "name")
    var name: String? = "",
    @ColumnInfo(name = "nickname")
    var nickname: String? = "",
    @ColumnInfo(name = "phone")
    var phone: String? = "",
    @ColumnInfo
    var avatar: String? = "", //不设置name默认为属性名
    @Ignore
    var registrationDate: String? = ""


) {
    override fun toString(): String {
        return "User(_id=$_id, id=$id, name=$name, phone=$phone, avatar=$avatar, registrationDate=$registrationDate)"
    }
}
